package main


import (
    "fmt"
)


type treeNode struct {
    value int
    left, right *treeNode
}


func createTreeNde(value int) *TreeNode {
    return &TreeNode{Value: value}
}


func main(){
    var root treeNode

    root = treeNode{value: 3}
    root.left = &treeNode{}
    root.right = &treeNode{5, nil, nil}
    root.left.right = createTreeNde(2)
    fmt.Print(root)
    fmt.Println(root.right)

    root.right.left = new(treeNode)
    fmt.Println(root)

    nodes := []treeNode {
        {value: 3},
        {},
        {6, nil, &root},
    }

    fmt.Println(nodes)
}

